package com.icss.th.db.sql;

public class SqlText 
{
	/**
	 * 得到试题信息SQL
	 */
	public static final String GET_QUESTION_SQL = "select ExamID,examType,examTitle,A,B,C,D,E,F,G,PageUrl,examAnswer,examExplain,inPaperId,paperTitle,inPaperSort,keyType from ExamData where ExamID=?";
	
	/**
	 * 得到下一题ID
	 */
	public static final String GET_NEXT_ID = "select ExamID from ExamData where inPaperId=? and inPaperSort>? order by inPaperSort limit 0,1";
	
	/**
	 * 得到上一题ID
	 */
	public static final String GET_PREVIOUS_ID = "select ExamID from ExamData where inPaperId=? and inPaperSort<? order by inPaperSort desc limit 0,1";
	
	/**
	 * 保存解析SQL
	 */
	public static final String GET_SAVEEXPLAIN_SQL = "INSERT INTO USEREXPLAIN VALUES (?,?,?,?,?)";
	
	/**
	 * 保存纠错SQL
	 */
	public static final String GET_SAVECORRECT_ID = "INSERT INTO CORRENT VALUES (?,?,?,?,?,?)";
	
	/**
	 * 得到下级科目
	 */
	public static final String GET_CHILDREN_SUBJECTS_SQL = "select id,sTitle,depLv from Subjects where ParentID=? and examIdCount>=? order by id";
	
	/**
	 * get top N subject
	 */
	public static final String GET_TOP_N_SUBJECT_SQL = "SELECT id,sTitle FROM subjects where depLv=2 order by paperCount desc limit ?";
}
